using System;
using FytSoa.Common.Utils;
using System.ComponentModel.DataAnnotations;
using FytSoa.Domain.Erp;
using SqlSugar;

namespace FytSoa.Application.Erp;

/// <summary>
/// erp生成订单详情-关联产品
/// </summary>
public class ErpProduceDetailDto : AppEntity
{
    /// <summary>
    /// 订单编号
    /// </summary>
    public long OrderId { get; set; } = 0;

    /// <summary>
    /// 产品编号
    /// </summary>
    [Required]
    public long ProductId { get; set; }
    
    /// <summary>
    /// 物料信息
    /// </summary>
    public ErpProduct Product { get; set; }

    /// <summary>
    /// 数量
    /// </summary>
    [Required]
    public int Count { get; set; } = 0;

    /// <summary>
    /// 价格
    /// </summary>
    [Required]
    public decimal Price { get; set; }

    /// <summary>
    /// 规格
    /// </summary>
    public string Specification { get; set; }

    /// <summary>
    /// 状态
    /// </summary>
    public bool Status { get; set; } = false;

    /// <summary>
    /// 生成完成时间
    /// </summary>
    public string ProduceTime { get; set; }

    /// <summary>
    /// 工时
    /// </summary>
    public int ManHour { get; set; } = 0;

    /// <summary>
    /// 创建人
    /// </summary>
    public string CreateUser { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    [Required]
    public DateTime CreateTime { get; set; } = DateTime.Now;

    /// <summary>
    /// 更新人
    /// </summary>
    public string UpdateUser { get; set; }

    /// <summary>
    /// 更新时间
    /// </summary>
    public DateTime? UpdateTime { get; set; }


}